<template>
	<div class="submitChainStore">
		<div class="submitChainStore-title">北卡龙汽车膜</div>
		<div class="submitChainStore-span">北卡龙电子质保查询</div>
		<div class="shop-body">
			<div class="shop-body-flex">
				<van-field v-model="licence_plate" label="汽车车牌等" placeholder="请输入汽车车牌、发动机编号.." />
			</div>
		</div>
		<div class="red">请输入您申请质保的、发动机编号、车架号</div>
		<div class="shop-button" @click="queClick()">确认</div>
	</div>
</template>

<script>
	import { Toast } from 'vant';
	export default {
	    data() {
			return {
				licence_plate: '',
			}
	    },
		methods:{
			queClick(){
				let that = this;
				if(!that.licence_plate){
					Toast.fail('汽车车牌、发动机编号、车架号不得为空');return;
				}
				that.$http('get','/api/index/licence_plate',{'licence_plate':that.licence_plate}) .then(function (res) {
					if(res.code==1){
						that.$router.push('/selectChaindetails?licence_plate='+res.data.licence_plate);
					}else{
						Toast.fail(res.msg);return;
					}
				});
				
			}
		}
	}
</script>

<style lang="less">
	.submitChainStore {
		width: 100%;
		height: 100%;
		background-color: #fbf9fe;
		.submitChainStore-title {
			text-align: center;
			padding-top: 30px;
			font-size: 32px;
			color: #333;
		}
		.submitChainStore-span {
			text-align: center;
			color: #888;
			padding-top: 10px;
		}
		.red {
			width: 90%;
			margin: auto;
			margin-top: 20px;
			color: red;
			font-size: 14px;
			text-align: center;
		}
		.shop-button {
			font-size: 15px;
		}
		
	}
</style>